package exception;

import java.util.ArrayList;
//JAVA堆溢出
public class HeapOOM {
    static class object{

    }
    public static void main(String[] args) {
        ArrayList<object> list = new ArrayList<>();
        while (true){
            list.add(new object());
        }

    }
}
